<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

//看看Vue的作用域插槽
Route::get('/slot', function(){
    return view('slot', ['users'=> \App\User::limit(8)->get()]);
});
//Route::view('/slot', 'slot', ['users'=> \App\User::limit(8)->get()]); //这行会导致 php artisan migrate 报错，不应该

//看看分页上下文
Route::get('/paginate', 'UserController@index');

